home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Internet / Web Things / HTML.edit 1.5b1.sit / HTML.edit.1.5b1 / HTML.edit v1.5b1 / HTML.edit v1.5b1.rsrc / TEXT_6948_Troubleshooting.txt < prev    next >
Encoding:
Text File  |  1994-11-30  |  2.5 KB  |  62 lines

  1.  
  2. National Center for Supercomputing Applications
  3. A Beginner's Guide to HTML
  4.  
  5. Troubleshooting
  6.  
  7. Avoid Overlapping Tags
  8.  
  9. Consider this snippet of HTML: 
  10.  
  11.     <B>This is an example of <DFN>overlapping</B> HTML tags.</DFN>
  12.  
  13. The word "overlapping'' is contained within both the <B> and <DFN> tags. How does the browser format it? You won't know until you look, and different browsers will likely react differently. In general, avoid overlapping tags.  
  14.  
  15.  
  16. Embed Anchors and Character Tags, But Nothing Else
  17.  
  18. It is acceptable to embed anchors within another HTML element: 
  19.  
  20.     <H1><A HREF = "Destination.html">My heading</A></H1>
  21.  
  22. Do not embed a heading or another HTML element within an anchor: 
  23.  
  24.     <A HREF = "Destination.html">
  25.     <H1>My heading</H1>
  26.     </A>
  27.  
  28. Although most browsers currently handle this example, it is forbidden by the official HTML and HTML+ specifications, and will not work with future browsers.  
  29.  
  30. Character tags modify the appearance of other tags: 
  31.  
  32.     <UL><LI><B>A bold list item</B>
  33.         <UL>
  34.         <LI><I>An italic list item</I>
  35.     </UL>
  36.  
  37. However, avoid embedding other types of HTML element tags. For example, it is tempting to embed a heading within a list, in order to make the font size larger:  
  38.  
  39.     <UL><LI><H1>A large heading</H1>
  40.         <UL>
  41.         <LI><H2>Something slightly smaller</H2>
  42.     </UL>
  43.  
  44. Although some browsers, such as NCSA Mosaic for the X Window System, format this construct quite nicely, it is unpredictable (because it is undefined) what other browsers will do. For compatibility with all browsers, avoid these kinds of constructs.  
  45.  
  46. What's the difference between embedding a <B> within a <LI> tag as opposed to embedding a <H1> within a <LI>? This is again a question of SGML. The semantic meaning of <H1> is that it's the main heading of a document and that it should be followed by the content of the document.Thus it doesn't make sense to find a <H1> within a list.  
  47.  
  48. Character formatting tags also are generally not additive. You might expect that 
  49.  
  50.     <B><I>some text</I></B>
  51.  
  52. would produce bold-italic text. On some browsers it does; other browsers interpret only the innermost tag (here, the italics).  
  53.  
  54.  
  55. Check Your Links
  56.  
  57. When an <IMG> tag points at an image that does not exist, a dummy image is substituted. When this happens, make sure that the referenced image does in fact exist, that the hyperlink has the correct information in the URL, and that the file permission is set appropriately (world-readable).  
  58.  
  59. back to External Images, Sounds, and Animations
  60. on to A Longer Example
  61. return to Beginner's Guide  Contents.
  62.